using SqlSugar;
using System.ComponentModel.DataAnnotations;
namespace Jst.Domain
{
    [SugarTable("SysTenant", TableDescription = "系统租户表 根据TenantType 分为两种方案: 1.按租户字段区分 2.按租户分库 注意:使用租户Id方案,无需配置分库的连接")]
    public partial class SysTenant
    {
        /// <summary>
        /// Id
        /// </summary>
        [Display(Name = "Id")]
        [SugarColumn(ColumnDescription = "Id", IsNullable = false, IsPrimaryKey = true, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public long Id { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [Display(Name = "名称")]
        [SugarColumn(ColumnDescription = "名称", IsNullable = false, IsPrimaryKey = false, IsIdentity = false)]
        [StringLength(255, ErrorMessage = "【{0}】不能超过{1}字符长度")]
        public string Name { get; set; }

        /// <summary>
        /// 租户类型
        /// </summary>
        [Display(Name = "租户类型")]
        [SugarColumn(ColumnDescription = "租户类型", IsNullable = false, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public int TenantType { get; set; }

        /// <summary>
        /// 数据库/租户标识 不可重复使用Id方案,可无需配置
        /// </summary>
        [Display(Name = "数据库/租户标识 不可重复使用Id方案,可无需配置")]
        [SugarColumn(ColumnDescription = "数据库/租户标识 不可重复使用Id方案,可无需配置", IsNullable = false, IsPrimaryKey = false, IsIdentity = false)]
        [StringLength(64, ErrorMessage = "【{0}】不能超过{1}字符长度")]
        public string ConfigId { get; set; }

        /// <summary>
        /// 主机使用Id方案,可无需配置
        /// </summary>
        [Display(Name = "主机使用Id方案,可无需配置")]
        [SugarColumn(ColumnDescription = "主机使用Id方案,可无需配置", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [StringLength(255, ErrorMessage = "【{0}】不能超过{1}字符长度")]
        public string Host { get; set; }

        /// <summary>
        /// 数据库类型使用Id方案,可无需配置
        /// </summary>
        [Display(Name = "数据库类型使用Id方案,可无需配置")]
        [SugarColumn(ColumnDescription = "数据库类型使用Id方案,可无需配置", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public int DbType { get; set; }

        /// <summary>
        /// 数据库连接使用Id方案,可无需配置
        /// </summary>
        [Display(Name = "数据库连接使用Id方案,可无需配置")]
        [SugarColumn(ColumnDescription = "数据库连接使用Id方案,可无需配置", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [StringLength(255, ErrorMessage = "【{0}】不能超过{1}字符长度")]
        public string Connection { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        [Display(Name = "状态")]
        [SugarColumn(ColumnDescription = "状态", IsNullable = false, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public bool Status { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Display(Name = "备注")]
        [SugarColumn(ColumnDescription = "备注", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [StringLength(255, ErrorMessage = "【{0}】不能超过{1}字符长度")]
        public string Remark { get; set; }

    }
}
